/**
 * 
 */
package jmine.tec.di.type;


/**
 * {@link TypeConverter} para {@link Integer} e int
 * 
 * @author takeshi
 */
public final class IntegerTypeConverter implements TypeConverter<Integer> {

    /**
     * {@inheritDoc}
     */
    public Integer convert(String value, Class<?> desiredType) throws TypeConvertionException {
        return Integer.valueOf(value);
    }

    /**
     * {@inheritDoc}
     */
    public boolean isTypeCompatible(Class<?> type) {
        return type == Integer.class || type == int.class;
    }
}